package com.ap.generator.registerconsumer;

import com.ap.core.cxf.jaxb.common.RequestTypeCode;
import com.ap.core.cxf.jaxb.manageconsumer.AbstractRegistrationInfoTypeGeneratorBuilder;
import com.ap.core.cxf.jaxb.managemerchant.RegisterMerchantMsgHdrType;
import com.ap.core.cxf.jaxb.managertp.SubmitRTPMessageType;
import com.ap.generator.common.FieldGenerator;
import com.ap.generator.messageheader.SubmitRTPMsgHdrTypeGeneratorBuilder;

import static com.ap.datagen.core.GeneratorHelper.buildA;
import static com.ap.datagen.core.GeneratorHelper.fixedValueGenerator;
import static com.ap.datagen.core.GeneratorHelper.randomGeneratorFromEnum;
import static com.ap.datagen.core.Nullable.nullable;
import static com.ap.datagen.lang.StringRandomGeneratorBuilder.stringRandomGeneratorBuilder;
import static com.ap.generator.registerconsumer.CredentialTypeGeneratorBuilder.getCredentialTypeGenerator;

public class RegistrationInfoTypeGeneratorBuilder extends AbstractRegistrationInfoTypeGeneratorBuilder {

	@Override
	public void setupDefaults() {
        this.FIIdGenerator = FieldGenerator.FIIDGENERATOR;
        this.FIConsumerIdGenerator = FieldGenerator.FICONSUMERIDGENERATOR;
        this.requestTypeGenerator = nullable(randomGeneratorFromEnum((RequestTypeCode.REGISTER)));
        this.credentialsGenerator = nullable(buildA(getCredentialTypeGenerator()));
        this.mobNbGenerator = nullable(stringRandomGeneratorBuilder().alphabeticUppper().length(10).build());

	}

	public static RegistrationInfoTypeGeneratorBuilder getRegistrationInfoTypeGenerator() {
		return new RegistrationInfoTypeGeneratorBuilder();
	}

}
